﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Hats.Master" AutoEventWireup="true" CodeBehind="AdminPanel.aspx.cs" Inherits="PickEmHats.AdminPanel" %>

<%@ Register Src="~/UserControls/EditTeams.ascx" TagPrefix="uc1" TagName="EditTeams" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function ShowCurrentTime() {
            $.ajax({
                type: "POST",
                url: "AdminPanel.aspx/GetCurrentTime",
                data: '{name: "' + $("#<%=txtUserName.ClientID%>")[0].value + '" }',
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: OnSuccess,
                failure: function (response) {
                    alert(response.d);
                }
            });
        }
        function OnSuccess(response) {
            alert(response.d);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div style="text-align: center;">
        <br />
        <asp:Button ID="btnEditTeams" runat="server" Text="Edit Teams" OnClick="btnEditTeams_Click" CssClass="ui-button" />&nbsp
        <asp:Button ID="btnEditPlayers" runat="server" Text="Edit Players" OnClick="btnEditTeams_Click" CssClass="ui-button" />&nbsp
        <asp:Button ID="btnEditSchedule" runat="server" Text="Edit Schedule" OnClick="btnEditSchedule_Click" CssClass="ui-button" />
        <input type="button" class="ui-button" value="TestWebMethod" onclick="TestWebMethod()" />
        <br />
        <br />
        <div style="width: 100%; text-align: center">
            <uc1:EditTeams runat="server" ID="ucEditTeams" Visible="false" />
        </div>
        <div>
            Your Name :
            <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
            <input id="btnGetTime" type="button" value="Show Current Time"
                onclick="ShowCurrentTime()" />
        </div>
    </div>
</asp:Content>
